import Vue from 'vue'
import VueRouter from 'vue-router'
import HelloWorld from '../components/HelloWorld.vue'
import Test from '../components/Test.vue'
//注册
Vue.use(VueRouter)

//创建路由规则
const routes = [{
	path: '/hw',
	component: HelloWorld

}, {
	path: '/test',
	component: Test
}]

//创建路由实例，并把路由规则传给实例对象
const router = new VueRouter({
	routes
})

export default router
